import java.util.PriorityQueue;

public class Old_pq_Heap {

		PriorityQueue<Edge> trackQueue;

		// create the priority queue on instantiation 
		public Old_pq_Heap (){		
			trackQueue = new PriorityQueue<Edge>();
		}
			
		// add a job to the print queue heap
		public void add(Edge track){
			trackQueue.add(track);
		}
		
		// remove the top print job from the print queue heap
		public Edge pop() {
			try{
				return trackQueue.remove();
			}catch (java.util.NoSuchElementException e){
				System.out.println("Heap is empty");
				return null;
			}
		}
		
		// return the job at the top of the print queue heap
		public Edge poll(){
			return trackQueue.poll();
		}
		
		// return if the print queue heap is empty or not
		public boolean isEmpty(){
			return trackQueue.isEmpty();
		}
		
		// return the heap size
		public int getSize(){
			return trackQueue.size();
		}
		
}
